<?php
/**
 * @version      BOSSCMS-Free
 * @trademark    BOSSCMS
 * @copyright    Copyright © by BOSSCMS-Free (https://www.bosscms.net/) 保留所有权利
 * @license      https://gitee.com/Greenpeas/BOSSCMS/license/ 和 https://www.bosscms.net/freelicense/
 * @link         https://www.bosscms.net/
 * @author       温州软界网络技术有限公司
**/
defined('IS_OK') or exit('Access Forbidden');
$icon = $_COOKIE['IframeIconOpen']?'icon':'';
$G['body_class'] = $G['config']['admin_theme_bgcolor'];
$iframe = into::load_class('admin','iframe','iframe','new');
?>
<?php load::into('head'); ?>
<header class="topnav <?php echo $icon; ?>">
  <div class="menu">
    <i class="fa fa-dedent"></i>
    <i class="fa fa-indent"></i>
  </div>
  <div class="snav"></div>
  <div class="wrap">
    <ul>
      <li class="free">
        <strong>
          <a href="javascript:;">
            <i class="fa fa-diamond"></i>
            <b>开源版</b>
          </a>
        </strong>
        <div class="buy">
          <dl>
            <?php if($G['authorize']['plus']){ ?>
            <dt class="update">
              <u>检测到您域名已授权</u>
              <a class="button green" href="javascript:;">立即升级</a>
            </dt>
            <dd>
              <b>升级系统需先在<a href="<?php echo url::mpf('template','market','init'); ?>" target="iframe">软件商店</a>登录官方账号</b>
              <b>温馨提示：</b>
              <b><i>1、</i>升级前请做好网站与数据的备份。</b>
              <b><i>2、</i>升级过程中请不要关闭浏览器，尽量在访客少时候升级。</b>
              <b><i>3、</i>如果您网站开启了宝塔加固或防篡改程序功能，请先关闭后再进行升级。</b>
            </dd>
            <?php }else{ ?>
            <dt>
              <u>企业版享有以下特权</u>
              <a class="button blue" href="https://www.bosscms.net/pricing/" target="_blank">立即购买</a>
            </dt>
            <dd>
              <span>
                <i class="fa fa-file-text-o"></i>
                <u>待审事项</u>
              </span>
              <span>
                <i class="fa fa-pencil-square-o"></i>
                <u>可视化编辑模式</u>
              </span>
              <span>
                <i class="fa fa-mortar-board"></i>
                <u>角色权限</u>
              </span>
              <span>
                <i class="fa fa-retweet"></i>
                <u>投稿评论统计</u>
              </span>
              <span>
                <i class="fa fa-puzzle-piece"></i>
                <u>高阶模型</u>
              </span>
              <span>
                <i class="fa fa-refresh"></i>
                <u>版本在线升级</u>
              </span>
              <span>
                <i class="fa fa-book"></i>
                <u>系统日志</u>
              </span>
              <span>
                <i class="fa fa-lock"></i>
                <u>安全加固(防篡改)</u>
              </span>
              <span>
                <i class="fa fa-id-badge"></i>
                <u>会员模块</u>
              </span>
              <span>
                <i class="fa fa-puzzle-piece"></i>
                <u>20+款付费插件</u>
              </span>
              <span>
                <i class="fa fa-columns"></i>
                <u>二次开发指导</u>
              </span>
              <span>
                <i class="fa fa-envelope-square"></i>
                <u>客服优先响应</u>
              </span>
            </dd>
            <?php } ?>
          </dl>
          <p><a href="https://www.bosscms.net/faqdoc/1552.html" target="_blank">【使用教程】开源版如何升级到企业版</a></p>
          <p>
            <a service href="javascript:;">
              · 帮助与客服
              <strong class="service">
                <span>
                  <img src="../system/admin/common/img/service.png" />
                  <b>联系微信客服</b>
                </span>
              </strong>
            </a>
          </p>
        </div>
      </li>
      <li><a domain 
      <?php if($G['config']['domain']){ ?>
      target="_blank" href="<?php echo $G['config']['domain']; ?>"
      <?php }else{ ?>
      href="javascript:_alert('未设置站点域名');"
      <?php } ?>      
      >网站</a></li>
      <li class="cache">
        <a href="javascript:;">缓存</a>
        <ul>
          <li><a href="javascript:;" url="<?php echo url::mpf('clear','clear','cache',array('jsonmsg'=>1)); ?>">清除全部</a></li>
          <li><a href="javascript:;" url="<?php echo url::mpf('clear','clear','files',array('jsonmsg'=>1)); ?>">清除缓存文件</a></li>
          <li><a href="javascript:;" url="<?php echo url::mpf('clear','clear','thumbnail',array('jsonmsg'=>1)); ?>">清除缩略图</a></li>
        </ul>
      </li>
	    <?php if($iframe->cover('language','R',true)){ ?>
      <li>
        <?php if(isMobile()){ ?>
        <a href="javascript:;">语言</a>
        <?php }else{ ?>
        <a href="<?php echo url::mpf('language','language','init'); ?>" target="iframe">语言</a>
        <?php } ?>
        <ul>
          <?php
          foreach($data['language'] as $v){
          ?>
          <li<?php if($v['id']==$G['language']['id']) echo ' class="on"'; ?>>
            <a href="<?php echo url::lang($G['path']['link'], $v['id']); ?>" title="<?php echo $v['name']; ?>">
              <img class="lang" src="<?php echo url::upload($v['image']); ?>" />
              <?php echo $v['name']; ?>
            </a>
          </li>
          <?php } ?>
        </ul>
      </li>
      <?php } ?>
      <li>
        <span class="user">
          <img src="<?php echo $G['manager']['image']?url::upload($G['manager']['image']):load::common('img/use_img.jpg','admin',true); ?>" />
          <b><?php echo $G['manager']['alias']?$G['manager']['alias']:$G['manager']['username']; ?></b>
        </span>
        <ul>
          <li><a href="<?php echo url::mpf('home','home','init'); ?>" target="iframe"><em class="fa fa-home"></em>欢迎页</a></li>
          <?php if($iframe->cover('manager','R',true)){ ?>
          <li><a href="<?php echo url::mpf('manager','manager','init',array('edit'=>$G['manager']['id'])); ?>" target="iframe"><em class="fa fa-user"></em>账号设置</a></li>
          <?php } ?>
          <li><a href="<?php echo url::mpf('login','login','logout'); ?>"><em class="fa fa-power-off"></em>退出登录</a></li>
        </ul>
      </li>
    </ul>
  </div>
</header>
<section class="category <?php echo $icon; ?> bosscms">
  <div class="logo">
    <a href="<?php echo $G['path']['url']; ?>" title="<?php echo $G['config']['admin_title']; ?>">
      <img class="img" rand src="../system/admin/common/img/logo.png" />
      <img class="ico" rand src="../system/admin/common/img/logo_ico.png" />
      <span><?php echo $G['config']['admin_title']; ?></span>
    </a>
  </div>
  <div class="nav">
    <ul nav="88">
      <li>
        <a href="javascript:;">
          <em class="fa fa-home"></em>
          <font>后台管理</font>
          <i class="fa fa-angle-down"></i>
        </a>
        <ul>
          <li class="home"><a href="<?php echo url::mpf('home','home','init'); ?>" target="iframe" name="后台-欢迎页">欢迎页</a></li>
        </ul>
      </li>
    </ul>
	  <?php foreach($data['navs'] as $key=>$value){ ?>
    <ul nav="<?php echo $key; ?>" <?php echo $pg=strstr($value['icon'],'plugin')?'plugin'.($G['plugin_must']?'':' hide').(' name="'.$value['name'].'"'):''; ?>>
	    <?php foreach($value['child'] as $val){ ?>
      <li>
        <a href="javascript:;">
          <em class="fa <?php echo $val['icon']; ?>"></em>
          <font><?php echo $val['name']; ?></font>
          <i class="fa fa-angle-down"></i>
        </a>
        <ul>
          <?php if(!$pg){ ?>
		      <?php foreach($val['child'] as $v){ ?>
          <li class="<?php echo $v['tag']; ?>">
            <a href="<?php echo url::mpf($v['mold'],$v['part']?$v['part']:$v['mold'],$v['func']?$v['func']:'init',$v['param']?$v['param']:array()); ?>" target="iframe" name="<?php echo $value['name']; ?>-<?php echo $v['name']; ?>"><?php echo $v['name']; ?></a>
          </li>
		      <?php }}else{ ?>
          <?php foreach($G['plugin_must'] as $v){ ?>
          <li class="<?php echo $v['mold']; ?>">
            <a href="<?php echo url::mpf($v['mold'],$v['part']?$v['part']:$v['mold'],$v['func']?$v['func']:'init'); ?>" target="iframe" name="<?php echo $value['name']; ?>-<?php echo $v['title']; ?>"><?php echo $v['title']; ?></a>
          </li>
          <?php }} ?>
        </ul>
      </li>
	    <?php } ?>
    </ul>
    <?php } ?>    
    <a class="shrink" href="javascript:;">
      <em class="fa fa-chevron-circle-left"></em>
      <font>收起菜单</font>
    </a>
  </div>
</section>
<section class="content <?php echo $icon; ?>">
  <iframe name="iframe" src="javascript:;"></iframe>
</section>
<?php load::into('foot'); ?>